// 校验手机号
export const checkPhone = (rule, value, callback) => {
  const reg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/
  if (reg.test(value)) {
    return callback()
  }
  return callback(new Error('请输入正确的手机号'))
}

// 获取设备宽度
export const deviceBrowserWidthAndHeight = () => {
  const w = window.innerWidth
  const h = window.innerHeight
  return { w, h }
}
